local ItemData = require("bag.Proto").ItemData
local RoleBase = require("role.Proto").RoleBase 
local HeroInfo = require("hero.Proto").HeroInfo
local HeroSimple = require("hero.Proto").HeroSimple
local BuyItem = require("topup.Proto").BuyItem

-- 幻境之塔查询
CG_HUANGJINGTOWER_QUERY = {}

HuanJingTowerData = {
	{"lv",                  1,        "short"},    -- 关卡id
	{"head",                3,        "int"},   -- 头像ID
	{"body",                1,        "int"},
	{"reward",              2,        ItemData},   -- 首通奖励
}

HuangJingTowerThreeRank = {
	{"roleBase",            1,       RoleBase},
	{"lv",                  1,       "int"},
}

GC_HUANGJINGTOWER_QUERY = {
	{"mylv",  					1,        "int"},  -- 我打到多少层
	{"maxLv",                   1,        "int"},  -- 总共有多少层
	{"cnt",                     1,        "byte"}, -- 拥有的挑战次数
	{"cntMax",          		1,        "int"},  -- 挑战最大次数
	{"canBuy",                  1,        "byte"},  -- 可购买次数
	{"list",                    30,       HuanJingTowerData},
	{"rank",                    3,     HuangJingTowerThreeRank},
	{"hasReward",				 1,		   "byte"},	-- 是否有可领奖励
	{"buyCost",					1,			"int"}, -- 购买挑战次数花费钻石
}

-- 奖励查询
HuangJingTowerReward = {
    {"id",					1,			"int"},		-- 奖励id
    {"reward",				3,			ItemData},	-- 奖励
    {"status",				1,			"byte"}, 	-- 0-不可领 1-可领 2-已领
	{"needLv",				1,			"short"},	-- 需要通过x层
}
CG_HUANGJINGTOWER_REWARD_QUERY = {
	{"type",                1,          "int"}      -- 查询类型  1 - 通关奖励查询   2 - 通关王者查询
}
GC_HUANGJINGTOWER_REWARD_QUERY = {
	{"isEnd",               1,          "byte"},
	{"type",                1,          "int"},     -- 查询类型  1 - 通关奖励查询   2 - 通关王者查询
	{"list",				30,			HuangJingTowerReward},
	{"lvMax",				1,			"short"},	-- 已通关层数
	{"state",               1,          "byte"},    -- 是否已解锁 通关王者	
	{"kingNeed",            1,          "int"},     -- 通关王者 解锁所需要的塔层
	{"hasRed",              2,          "int"},     -- 红点
}

CG_HUANGJINGTOWER_KING_REWARD = {
}
GC_HUANGJINGTOWER_KING_REWARD = {
	{"reward",              5,          ItemData},       -- 激活立即获得
	{"allItem",             5,          ItemData},       -- 通关王者所有奖励总览
	{"buyItem",             1,          BuyItem},        -- 直购相关信息 售价/礼包名/描述等 
}

-- 奖励领取 领取成功会返回GC_HUANGJINGTOWER_REWARD_GET和GC_HUANGJINGTOWER_REWARD_QUERY
CG_HUANGJINGTOWER_REWARD_GET = {
	{"type",                1,          "byte"},    -- 领取类型  1 - 通关奖励领取  2 - 通关王者领取
    {"id",					1,			"int"},		-- 奖励id	
}
GC_HUANGJINGTOWER_REWARD_GET = {
	{"hasReward",			1,		    "byte"},	-- 是否有可领奖励	

}

-- 幻境之塔战斗查询
CG_HUANGJINGTOWER_FIGHT_QUERY = {
	{"lv",         1,         "int"},
}

GC_HUANGJINGTOWER_FIGHT_QUERY = {
	{"lv",                       1,         "int"},
	{"zhandouli",                1,         "int"},
	{"isSaoDang",                1,         "byte"}, -- 是否可以扫荡      (策划修改了需求, 在这里发送节省客户端时间)
	{"buyCost",                  1,         "int"}, 
	{"canBuy",                   1,         "byte"},
	{"monsterList",              6,         HeroSimple},
	{"rewardList",               5,         ItemData},
	{"fristReward",              2,         ItemData},
}

-- 幻境之塔购买体力查询
CG_HUANGJINGTOWER_BUY_TILI_QUERY = {
}

GC_HUANGJINGTOWER_BUY_TILI_QUERY = {
	{"needItemID",           1,         "int"},
	{"needItemCnt",          1,         "int"},
	{"buyItem",				 1,			ItemData},
}

-- 幻境之塔购买体力
CG_HUANGJINGTOWER_BUY_TILI_DO = {
	{"buyCnt",               1,        "byte"},
}

GC_HUANGJINGTOWER_BUY_TILI_DO = {
	{"cnt",                     1,        "byte"},
	{"canBuy",                  1,        "byte"},  -- 可购买次数
	{"buyCost",					1,		  "int"}, -- 购买挑战次数花费钻石
}


-- 查看通关信息
CG_HUANGJINGTOWER_QUERY_FIGHT_DATA = {
	{"lv",             1,         "int"},
}
HuangJingTowerRecord = {
	{"index",      	   1,             "int"},         -- 1 最近   2  最快  3  战力最低
	{"roleBase",       1,         RoleBase},	
	{"zhanli",         1,         "int"},
	{"time",           1,         "int"},             -- 战斗发生时间
	{"useTime",		   1,		  "int"},             -- 战斗用时
}
GC_HUANGJINGTOWER_QUERY_FIGHT_DATA = {
	{"lv",              1,         "int"},
	{"list",			3,			HuangJingTowerRecord},
}

CG_HUANGJINGTOWER_READ_VIDEO = {
	{"lv",              1,         "int"},
	{"index",           1,         "int"},
}

-- 通天塔扫荡
CG_HUANGJINGTOWER_SAODANG = {
	{"lv",             1, "int"},
}

-- 查询 这层所有玩家
CG_HUANGJINGTOWER_LV_ALLHUMAN = {
	{"lv",             1,  "int"},
}

GC_HUANGJINGTOWER_LV_ALLHUMAN = {
	{"role",          10 ,    RoleBase},
}